﻿/**
*   @Copyright 2007 Vesatile Informatique
*
*   Version: 1.00
*   Creation Date:01.04.2007
*   Change Date: 23.02.2011
*   Creators Name: Anourak Bouavong
*   Last Edited By: Kalyan Bag
*   Description:[Editor Object]
*/

var EditorObject = new Object();
EditorObject.UID = new Object();
EditorObject.PreID = new Object();


//#region

/*************Tree ajax query***********************/

EditorObject.Ajax = new Object();
EditorObject.Ajax.Page = "TemplateEditorAjax.aspx";
EditorObject.Ajax.Type = new Object();
EditorObject.Ajax.Type.Get = "Get";
EditorObject.Ajax.Type.Post = "Post";
EditorObject.Ajax.DATATYPE = new Object();
EditorObject.Ajax.DATATYPE.text = "text";
EditorObject.Ajax.DATATYPE.xml = "xml";
EditorObject.Ajax.DATATYPE.json = "json";
EditorObject.Ajax.DATATYPE.script = "script";
EditorObject.Ajax.DATATYPE.html = "html";

/*****************************************************/

//#endregion

EditorObject.DefaultHTML = "<div><div>&nbsp;</div></div><div><div>&nbsp;</div></div>";
EditorObject.InitSheetId = "T1";
EditorObject.InitSheetName = "Sheet1";

EditorObject.Stack = new Object();

EditorObject.Group = new Object();
EditorObject.Group.Sheet = "Sheet";
EditorObject.Group.Control = "Control";
EditorObject.Group.Grid = "Grid";
EditorObject.Group.Section = "Section";
EditorObject.Group.Grid_HEADER = "HEADER";
EditorObject.Group.Grid_BODY = "BODY";
EditorObject.Group.Grid_FOOTER = "FOOTER";



EditorObject.Type = new Object();

EditorObject.Type.Sheet = new Object();
EditorObject.Type.Sheet.Id = "T";
EditorObject.Type.Sheet.Name = "Sheet";

EditorObject.Type.Textbox = new Object();
EditorObject.Type.Textbox.Id = "CTB";
EditorObject.Type.Textbox.Name = "TextBox";

EditorObject.Type.Textarea = new Object();
EditorObject.Type.Textarea.Id = "CTA";
EditorObject.Type.Textarea.Name = "Textarea";

EditorObject.Type.ComboBox = new Object();
EditorObject.Type.ComboBox.Id = "CCB";
EditorObject.Type.ComboBox.Name = "ComboBox";

EditorObject.Type.Calendar = new Object();
EditorObject.Type.Calendar.Id = "CCD";
EditorObject.Type.Calendar.Name = "Calendar";

EditorObject.Type.CheckBox = new Object();
EditorObject.Type.CheckBox.Id = "CCK";
EditorObject.Type.CheckBox.Name = "CheckBox";

EditorObject.Type.Grid = new Object();
EditorObject.Type.Grid.Id = "G";
EditorObject.Type.Grid.Name = "Grid";

EditorObject.Type.Section = new Object();
EditorObject.Type.Section.Id = "S";
EditorObject.Type.Section.Name = "Section";

EditorObject.Grid = new Object();
EditorObject.Grid.DefaultBodyField = 3;

EditorObject.CONTROL_TYPE = new Object();
EditorObject.CONTROL_TYPE.Textbox = "Textbox";
EditorObject.CONTROL_TYPE.Textarea = "Textarea";
EditorObject.CONTROL_TYPE.ComboBox = "ComboBox";
EditorObject.CONTROL_TYPE.Calendar = "Calendar";
EditorObject.CONTROL_TYPE.CheckBox = "CheckBox";

EditorObject.DATATYPE = new Object();
EditorObject.DATATYPE.Textbox = "String";
EditorObject.DATATYPE.Textarea = "String";
EditorObject.DATATYPE.ComboBox = "Integer";
EditorObject.DATATYPE.Calendar = "String";
EditorObject.DATATYPE.CheckBox = "Bit";

EditorObject.CONTROL_DATATYPE_ID = new Object();
EditorObject.CONTROL_DATATYPE_ID.Textbox = "16";
EditorObject.CONTROL_DATATYPE_ID.Textarea = "17";
EditorObject.CONTROL_DATATYPE_ID.ComboBox = "18";
EditorObject.CONTROL_DATATYPE_ID.Calendar = "19";
EditorObject.CONTROL_DATATYPE_ID.CheckBox = "20";

EditorObject.formLookUpMap = new Object();
EditorObject.formLookUpMap.ID = "ID";
EditorObject.formLookUpMap.NAME = "NAME";
EditorObject.formLookUpMap.LAST_OPEN_TAB = "LAST_OPEN_TAB";
EditorObject.formLookUpMap.IS_TREE_OPEN = "IS_TREE_OPEN";
EditorObject.formLookUpMap.STATUS = "STATUS";

EditorObject.tabLookUpMap = new Object();
EditorObject.tabLookUpMap.ID = "ID";
EditorObject.tabLookUpMap.NAME = "NAME";
EditorObject.tabLookUpMap.ACTION_STATUS = "ACTION_STATUS";
EditorObject.tabLookUpMap.CSS_DESIGN = "CSS_DESIGN";
EditorObject.tabLookUpMap.HTML_DESIGN = "HTML_DESIGN";
EditorObject.tabLookUpMap.IS_TREE_OPEN = "IS_TREE_OPEN";
EditorObject.tabLookUpMap.STATUS = "STATUS";
EditorObject.tabLookUpMap.HELP_TEXT_ID = "HELP_TEXT_ID";
EditorObject.tabLookUpMap.SECURITY = "SECURITY";
EditorObject.tabLookUpMap.HTML = "HTML";

EditorObject.controlLookUpMap = new Object();
EditorObject.controlLookUpMap.FIELD_ID = "ID";
EditorObject.controlLookUpMap.NAME = "NAME";
EditorObject.controlLookUpMap.DATATYPE = "DATATYPE";
EditorObject.controlLookUpMap.CONTROL_TYPE = "CONTROL_TYPE";
EditorObject.controlLookUpMap.CONTROL_DATATYPE = "CONTROL_DATATYPE";
EditorObject.controlLookUpMap.DATATYPE_LENGTH = "DATATYPE_LENGTH";
EditorObject.controlLookUpMap.CONTROL_TYPE_ID = "CONTROL_TYPE_ID";
EditorObject.controlLookUpMap.CONTROL_DATATYPE_ID = "CONTROL_DATATYPE_ID";
EditorObject.controlLookUpMap.CONTROL_LINK = "CONTROL_LINK";
EditorObject.controlLookUpMap.CONTROL_FORMAT = "CONTROL_FORMAT";
EditorObject.controlLookUpMap.CSS_DESIGN = "CSS_DESIGN";
EditorObject.controlLookUpMap.UI_ORDER = "UI_ORDER";
EditorObject.controlLookUpMap.RECENT_PARENT_TYPE = "RECENT_PARENT_TYPE";
EditorObject.controlLookUpMap.DEFAULT_VALUE = "DEFAULT_VALUE";
EditorObject.controlLookUpMap.FORMULA = "FORMULA";
EditorObject.controlLookUpMap.OLD_FORMULA = "OLD_FORMULA";
EditorObject.controlLookUpMap.IS_VALID_FORMULA = "IS_VALID_FORMULA";
EditorObject.controlLookUpMap.STANDARD_VALIDATION = "STANDARD_VALIDATION";
EditorObject.controlLookUpMap.VALIDATION_START_RANGE = "VALIDATION_START_RANGE";
EditorObject.controlLookUpMap.VALIDATION_END_RANGE = "VALIDATION_END_RANGE";
EditorObject.controlLookUpMap.CUSTOM_VALIDATION_REGEX = "CUSTOM_VALIDATION_REGEX";
EditorObject.controlLookUpMap.HELP_TEXT_ID = "HELP_TEXT_ID";
EditorObject.controlLookUpMap.STATUS = "STATUS";
EditorObject.controlLookUpMap.SECURITY = "SECURITY";
EditorObject.controlLookUpMap.CONTROL_TABLE = "CONTROL_TABLE";

EditorObject.gridLookUpMap = new Object();
EditorObject.gridLookUpMap.ID = "ID";
EditorObject.gridLookUpMap.NAME = "NAME";
EditorObject.gridLookUpMap.UI_ORDER = "UI_ORDER";
EditorObject.gridLookUpMap.CSS_DESIGN = "CSS_DESIGN";
EditorObject.gridLookUpMap.IS_TREE_OPEN = "IS_TREE_OPEN";
EditorObject.gridLookUpMap.STATUS = "STATUS";
EditorObject.gridLookUpMap.HELP_TEXT_ID = "HELP_TEXT_ID";

EditorObject.sectionLookUpMap = new Object();
EditorObject.sectionLookUpMap.ID = "ID";
EditorObject.sectionLookUpMap.NAME = "NAME";
EditorObject.sectionLookUpMap.UI_ORDER = "UI_ORDER";
EditorObject.sectionLookUpMap.IS_TREE_OPEN = "IS_TREE_OPEN";
EditorObject.sectionLookUpMap.STATUS = "STATUS";
EditorObject.sectionLookUpMap.HELP_TEXT_ID = "HELP_TEXT_ID";
EditorObject.sectionLookUpMap.SECURITY = "SECURITY";

EditorObject.Status = new Object();
EditorObject.Status.New = "New";
EditorObject.Status.Update = "Update";
EditorObject.Status.Delete = "Delete";
EditorObject.Status.NewDelete = "NewDelete";

EditorObject.Property = new Object();
EditorObject.Property.Name = "Name";
EditorObject.Property.Functionality = "Functionality";
EditorObject.Property.Design = "Design";

EditorObject.Field = null;

EditorObject.GLOBAL_JSON = null;